﻿using System;
using System.Web;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Truextend.CoffeShop.Presenter.Orders;

namespace Truextend.CoffeShop.Layouts.Truextend.CoffeShop
{
    public partial class ReasonToDelete : LayoutsPageBase , IApproveOrRejectOrder
    {
        private ApproveOrRejectOrderPresenter presenter = null;

        protected void Page_Load(object sender, EventArgs e)
        {
            presenter = new ApproveOrRejectOrderPresenter(this);
        }

        protected void BtnAccept_Click(object sender, EventArgs e)
        {            

            presenter.RejectedOrder();

            HttpContext context = HttpContext.Current;

            context.Response.Write("<script type='text/javascript'>window.frameElement.commitPopup('"+ TxBxReason.Text+" ');</script>");
            context.Response.Flush();
            context.Response.End();
        }

        #region interface Implements
        public string address
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public System.Data.DataTable options
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public int orderId
        {
            get
            {
                return int.Parse(Request.QueryString["orderId"].ToString());                
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public string orderTitle
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public string phones
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public string restaurantName
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public float totalPrice
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }
        #endregion
    }
}
